'use strict';

/**
 * 投递记录
 */
angular.module('app').controller('postCtrl',['$http','$scope',function ($http,$scope) {
    $scope.tabList = [{
        id:'all',
        name:'全部'
    },{
        id:'pass',
        name:'面试邀请'
    },{
        id:'fail',
        name:'不合适'
    }];
    /**
     * 获取投递记录列表
     */
    $http.get('data/myPost.json').success(function (res) {
       $scope.positionList = res;
    });

    $scope.filterObj = {};
    $scope.tClick = function(id, name) {
        switch (id) {
            case 'all':
                delete $scope.filterObj.state;
                break;
            case 'pass':
                $scope.filterObj.state = '1';
                break;
            case 'fail':
                $scope.filterObj.state = '-1';
                break;
            default:
        }
    }
}]);




